bookings were made to be taken from server per time they are searched
[RRRRHHHH_Code] / ruralHouses client / src / gui / listOfBookingRequestsGUI.java
index 423ea4d..2106e88 100644 (file)
@@ -22,7 +22,8 @@ import javax.swing.table.DefaultTableCellRenderer;
 import javax.swing.table.DefaultTableModel;
 
 import common.BookingInterface;
-
+import common.HouseInterface;
+import common.OfferInterface;
 import configuration.___IntNames;
 import domain.Booking;
 import domain.Offer;
@@ -62,7 +63,22 @@ public class listOfBookingRequestsGUI extends JFrame {
                setContentPane(contentPane);
                contentPane.setLayout(null);
 
-               this.bookings = this.off.getBookings();
+               BookingInterface bm = null;
+               
+               try {
+                       bm = (BookingInterface) Naming
+                                       .lookup(___IntNames.BookingManager);
+
+               } catch (Exception e1) {
+                       System.out.println("Error accessing remote authentication: "
+                                       + e1.toString());
+               }
+               try {
+                       this.bookings = bm.getOffersbookings(this.off);
+               } catch (RemoteException e1) {
+                       e1.printStackTrace();
+               }
+               
                JLabel lblNewLabel = new JLabel();
                lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
                lblNewLabel.setBounds(23, 41, 536, 33);